package com.longling.hayarider.adapter;

import android.content.Context;
import android.database.DataSetObserver;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Adapter;

import java.util.List;

/**
 * @ClassName MyAdapter
 * @Description TODO
 * @date 2021-09-09 14:56
 * @Company LongLing
 * @Version 1.0
 * @Author 潇妙
 */
public class MyAdapter implements Adapter {

    private String TAG = this.getClass().getName();

    private View mView;
    private Context mContext;
    private List<Object> mList;

    public MyAdapter(Context context,List<Object>list){
        this.mContext=context;
        this.mList=list;
    }
    public MyAdapter(Context context){
        this.mContext=context;
    }

    public MyAdapter(){

    }


    @Override
    public void registerDataSetObserver(DataSetObserver observer) {

    }

    @Override
    public void unregisterDataSetObserver(DataSetObserver observer) {

    }

    @Override
    public int getCount() {
        return mList.size();
    }

    @Override
    public Object getItem(int position) {
        return mList.get(position);
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    @Override
    public boolean hasStableIds() {
        return false;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        return null;
    }

    @Override
    public int getItemViewType(int position) {
        return position;
    }

    @Override
    public int getViewTypeCount() {
        return mList.size();
    }

    @Override
    public boolean isEmpty() {
        return false;
    }

    public void setmContext(Context mContext) {
        this.mContext = mContext;
    }

    public Context getmContext() {
        return mContext;
    }

    public void setmList(List<Object> mList) {
        this.mList = mList;
    }

    public List<Object> getmList() {
        return mList;
    }
}
